Skip to content

Implement PcntlForkJobRunner#6288

Closed
staabm wants to merge 1 commit intosebastianbergmann:mainfrom
staabm:fork5
Closed

Implement PcntlForkJobRunner#6288
staabm wants to merge 1 commit intosebastianbergmann:mainfrom
staabm:fork5

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Aug 3, 2025

running
php phpunit tests/end-to-end/phar/tests/standard/GreeterTest.php -c tests/end-to-end/phar/phpunit.xml
with a fork Time: 00:00.005, Memory: 16.00 MB
with a subprocess Time: 00:00.031, Memory: 16.00 MB

Todo

  • implement PcntlForkJobRunner
  • make CI run with pcntl
  • fix tests
  • add attribute parameter to RunTestsInSeparateProcesses, RunInSeparateProcess to opt-in fork-mode

@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Aug 3, 2025

currently one test is failling:

1) /Users/staabm/workspace/phpunit/tests/end-to-end/regression/5592-process-isolation.phpt
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 
 --
 
-There was 1 risky test:
+There were 2 risky tests:
 
 1) PHPUnit\TestFixture\Issue5592Test::testRemovedErrorHandler
 Test code or tested code removed error handlers other than its own
@@ @@
 
 /Users/staabm/workspace/phpunit/tests/end-to-end/regression/5592/Issue5592Test.php:33
 
+2) PHPUnit\TestFixture\Issue5592Test::testRemovedExceptionHandler
+Test code or tested code removed exception handlers other than its own
+
+/Users/staabm/workspace/phpunit/tests/end-to-end/regression/5592/Issue5592Test.php:52
+
 FAILURES!
-Tests: 6, Assertions: 6, Failures: 4, Risky: 1.
+Tests: 6, Assertions: 6, Failures: 4, Risky: 2.

/Users/staabm/workspace/phpunit/tests/end-to-end/regression/5592-process-isolation.phpt:45
/Users/staabm/workspace/phpunit/src/Framework/TestSuite.php:374
/Users/staabm/workspace/phpunit/src/Framework/TestSuite.php:374
/Users/staabm/workspace/phpunit/src/TextUI/TestRunner.php:64
/Users/staabm/workspace/phpunit/src/TextUI/Application.php:228

FAILURES!
Tests: 4591, Assertions: 12200, Failures: 1, Skipped: 23, Incomplete: 1.

... I wonder why 0e4f6d8 started to ignore "Test code or tested code did not remove its own error handlers" when test run in isolation, but did not the same for "Test code or tested code removed error handlers other than its own" ?

edit: answered in 0e4f6d8#r163466240

@sebastianbergmann
Copy link
Copy Markdown
Owner

Do you intend to continue to work on this or can I 1) close this pull request and 2) remove the hook for alternative job runners? Thank you.

@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Apr 15, 2026

yeah, atm I have no use for this and don't have time to finish it.

I will try to allocate some time so I can remove the hook for alternative job runners

@sebastianbergmann
Copy link
Copy Markdown
Owner

I will try to allocate some time so I can remove the hook for alternative job runners

No worries, I'll do the cleanup.

@sebastianbergmann
Copy link
Copy Markdown
Owner

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it.

@staabm staabm deleted the fork5 branch April 15, 2026 08:49
@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Apr 15, 2026

thank you!

sebastianbergmann added a commit that referenced this pull request Apr 15, 2026
sebastianbergmann added a commit that referenced this pull request Apr 15, 2026
sebastianbergmann added a commit that referenced this pull request Apr 15, 2026
sebastianbergmann added a commit that referenced this pull request Apr 15, 2026
* 13.1:
  Clean up after #6288 (comment)
sebastianbergmann added a commit that referenced this pull request Apr 16, 2026
sebastianbergmann added a commit that referenced this pull request Apr 16, 2026
sebastianbergmann added a commit that referenced this pull request Apr 16, 2026
sebastianbergmann added a commit that referenced this pull request Apr 16, 2026
* 13.1:
  Clean up after #6288 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants